﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Xiaov.SmartWeb.Infrastructure.Cache;
using Xiaov.SmartWeb.Infrastructure.Common;
using Xiaov.SmartWeb.Infrastructure.ExtMethod;
using Xiaov.SmartWeb.Model;
using Xiaov.SmartWeb.Model.Domain;

namespace Xiaov.SmartWeb.Application.SysAdmin
{
    public partial class Admin_Cache : BasePage
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            //权限横切
            PM_Filter();
            AjaxPro.Utility.RegisterTypeForAjax(typeof(Admin_Cache));
        }

        [AjaxPro.AjaxMethod]
        public void ClearCache(string key)
        {
            if(string.IsNullOrEmpty(key))
                CacheFactroy.Instance().RemoveCache();
            else
                CacheFactroy.Instance().RemoveCache(key);
        }
    }
}